com.sun.n1.sps.model.host
Interface Host

All Superinterfaces:
VariableSettingsSource

public interface Host
extends VariableSettingsSource

A host is the internal representation of a deployment target. Hosts are either virtual or physical.

A physical host corresponds to a physical machine in an IP network. It contains one or more application instances, each of which defines its IP address and other characteristics required to connect to the corresponding application node running on the associated machine.

A virtual host correpsonds to a logical deployment target other than a physical machine, such as an application server. A virtual host has an associated parent host which represents the host on which the virtual host resides. Most often, this is a physical host, but virtual hosts can also be nested within other virtual hosts to any depth.

A host is also associated with a HostType object, and is able to define host-specific override values for the variables defined by the host type. This feature allows the API user to search for hosts by defining a particular value for a particular variable, and to perform variable substitution based on the variable values defined by a host.

Hosts may also be contained as members of one or more host sets, which allows hosts to be logically grouped tgether according to the needs of the client.


Method Summary
 boolean containsOverrideVarValue(java.lang.String varName)
          Returns true if an override value for the variable with the passed name is defined by this host, false otherwise.
 boolean containsVarValue(java.lang.String varName)
          Returns true if a variable with the passed name is available on this host, false otherwise.
 AppInstance getAppInstance(AppType appType)
          Returns the app instance with the given type contained on this host, or null if no such app instance exists.
 AppInstance[] getAppInstances()
          Returns all app instances contained on this host.
 AppInstance getAppLD()
          Returns the local distributor app instance contained on this host, or null if no such app instance exists.
 AppInstance getAppMS()
          Returns the master server app instance contained on this host, or null if no such app instance exists.
 AppInstance getAppRA()
          Returns the remote agent app instance contained on this host, or null if no such app instance exists.
 java.lang.String getDescription()
          Returns the description of this object.
 HostSetIDSet getHostSetIDSet()
          Returns a set of host set IDS of which this host is a direct member.
 HostType getHostType()
          Returns the host type associated with this host.
 HostTypeID getHostTypeID()
          Returns the ID of the host type associated with this host.
 HostID getID()
          Returns the ID of this object.
 InstalledComponentID getInstalledComponentID()
          Returns the InstalledComponentID associated with this host.
 MachineInfo getMachineInfo()
          Returns information describing the physical machine associated with this host, or null if this host does not directly contain an RA app instance.
 java.util.Date getMachineInfoTimestamp()
          Returns the date that the machine info was last updated, or indicates that this host does not directly contain an RA app instance.
 java.lang.String getName()
          Returns the name of this object.
 java.lang.String[] getOverrideVarNames()
          Returns the names of all variables for which override values have been defined by this host.
 java.lang.String getOverrideVarValue(java.lang.String varName)
          Returns the override value defined by this host for the variable with the passed name, or null if an override is not defined by this host.
 HostID getParentHostID()
          Returns the ID of the parent host of this host, or null if this host is physical rather than virtual.
 java.lang.String[] getVarNames()
          Returns the names of all variables available for use on this host, as defined by the associated host type.
 java.lang.String getVarValue(java.lang.String varName)
          Returns the value currently defined for the variable with the passed name, or null if no variable with the passed name exists.
 Visibility getVisibility()
          Returns the current visibility of this object.
 boolean isPrepared()
          Returns true if this host is currently locally prepared, false otherwise.
 boolean isVirtual()
          Returns true if this host is a virtual host, false if this host is a physical host.
 

Method Detail

getID

HostID getID()
Returns the ID of this object.

Returns:
The ID of this object.

getHostTypeID

HostTypeID getHostTypeID()
Returns the ID of the host type associated with this host. The host type defines the variables that are accessible to and may be overridden by the host.

Returns:
The host type ID.

getParentHostID

HostID getParentHostID()
Returns the ID of the parent host of this host, or null if this host is physical rather than virtual. Note that the immediate parent may be either physical or virtual, but the root ancestor is always be a physical host.

Returns:
The ID of the parent host.

isPrepared

boolean isPrepared()
Returns true if this host is currently locally prepared, false otherwise.

Note that a host is locally prepared if its machine info is non-null and there are no active system services that need to be installed on it according to its current machine info settings.

Returns:
true if this host is locally prepared, false otherwise.

isVirtual

boolean isVirtual()
Returns true if this host is a virtual host, false if this host is a physical host. Virtual hosts have a non-null parent host ID, physical hosts have null parent host ID.

Returns:
true if-and-only-if this host is virtual.

getInstalledComponentID

InstalledComponentID getInstalledComponentID()
Returns the InstalledComponentID associated with this host.

If this host is being used by a targetable component, the InstalledComponentID refers to the targetable component installation that created this host. If this host is not being used by a targetable component, the InstalledComponentID value is null.

Returns:
Returns the InstalledComponentID associated with this host.

getVarNames

java.lang.String[] getVarNames()
Returns the names of all variables available for use on this host, as defined by the associated host type. The order of the names returned is the order of declaration in the host type. If no variables are defined on the associated host type, the empty array is returned.

Specified by:
getVarNames in interface VariableSettingsSource
Returns:
The names of the variables available for use on this host.

getOverrideVarNames

java.lang.String[] getOverrideVarNames()
Returns the names of all variables for which override values have been defined by this host. This is a subset of the names returned by the getVarNames() method. The order of the names returned is undefined. If no variables are overridden, the empty array is returned.

Returns:
The names of the variables overridden by this host.

getVarValue

java.lang.String getVarValue(java.lang.String varName)
Returns the value currently defined for the variable with the passed name, or null if no variable with the passed name exists. If a host-specific override for the named variable is declared, it is returned. Otherwise the default value defined by the host type is returned.

Specified by:
getVarValue in interface VariableSettingsSource
Parameters:
varName - the name of the variable to look up.
Returns:
The value of the variable with the passed name.

getOverrideVarValue

java.lang.String getOverrideVarValue(java.lang.String varName)
Returns the override value defined by this host for the variable with the passed name, or null if an override is not defined by this host.

Parameters:
varName - the name of the variable to look up.
Returns:
The override value of the variable with the passed name.

containsVarValue

boolean containsVarValue(java.lang.String varName)
Returns true if a variable with the passed name is available on this host, false otherwise.

Specified by:
containsVarValue in interface VariableSettingsSource
Parameters:
varName - the name of the variable to look up.
Returns:
true if a value exists, false otherwise.

containsOverrideVarValue

boolean containsOverrideVarValue(java.lang.String varName)
Returns true if an override value for the variable with the passed name is defined by this host, false otherwise.

Parameters:
varName - the name of the variable to look up.
Returns:
true if an override value exists, false otherwise.

getHostType

HostType getHostType()
Returns the host type associated with this host. The host type defines the variables available for use by this host.

Returns:
The host type associated with this host.

getHostSetIDSet

HostSetIDSet getHostSetIDSet()
Returns a set of host set IDS of which this host is a direct member. By default, the empty set is returned.

Returns:
Returns a set of host set IDS of which this host is a member.

getAppInstance

AppInstance getAppInstance(AppType appType)
Returns the app instance with the given type contained on this host, or null if no such app instance exists.

Parameters:
appType - the type of the desired app instance.
Returns:
The app instance with the given type, or null if none exists.

getAppInstances

AppInstance[] getAppInstances()
Returns all app instances contained on this host. If no app instances exist, the empty array is returned.

Returns:
All app instances contained on this host.

getAppRA

AppInstance getAppRA()
Returns the remote agent app instance contained on this host, or null if no such app instance exists.

Returns:
The remote agent app instance, or null if undefined.

getAppMS

AppInstance getAppMS()
Returns the master server app instance contained on this host, or null if no such app instance exists.

Returns:
The master server app instance, or null if undefined.

getAppLD

AppInstance getAppLD()
Returns the local distributor app instance contained on this host, or null if no such app instance exists.

Returns:
The local distributor app instance, or null if undefined.

getMachineInfo

MachineInfo getMachineInfo()
Returns information describing the physical machine associated with this host, or null if this host does not directly contain an RA app instance.

Returns:
The machine info.
See Also:
getMachineInfoTimestamp()

getMachineInfoTimestamp

java.util.Date getMachineInfoTimestamp()
Returns the date that the machine info was last updated, or indicates that this host does not directly contain an RA app instance.

Returns:
The date that the machine info was last updated for this host.
See Also:
getMachineInfo()

getVisibility

Visibility getVisibility()
Returns the current visibility of this object.

Returns:
The visibility of this object.

getName

java.lang.String getName()
Returns the name of this object.

Returns:
The name of this object.

getDescription

java.lang.String getDescription()
Returns the description of this object.

Returns:
The description of this object.